package com.itfreer.cms.dao.module;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;

import org.springframework.beans.BeanUtils;

import com.itfreer.cms.dao.base.JdbcTreeEntityBase;
import com.itfreer.cms.entity.module.SiteEntity;
import com.itfreer.form.api.JdbcBaseEntity;

/**
 * 站点jdbc实体
 */
@Entity(name = "cms_site")
public class JdbcSiteEntity extends JdbcTreeEntityBase implements JdbcBaseEntity<SiteEntity>, Serializable {

	private static final long serialVersionUID = 2242463259301628830L;

	/**
	 * 所属机构ID
	 */
	@Column(name = "s_orgid", length = 50, nullable = true)
	private String organizationId;

	public String getOrganizationId() {
		return organizationId;
	}

	public void setOrganizationId(String organizationId) {
		this.organizationId = organizationId;
	}

	@Override
	public void from(SiteEntity t) {
		BeanUtils.copyProperties(t, this);
	}

	@Override
	public SiteEntity toEntity() {
		SiteEntity toEntity = new SiteEntity();
		BeanUtils.copyProperties(this, toEntity);
		return toEntity;
	}
}